/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package validation;

import org.jdesktop.beansbinding.Validator;
import org.jdesktop.beansbinding.Validator.Result;

/**
 *
 * @author Usuario
 */
public class OnlyLettersValidator extends Validator<String>{

    @Override
    public Result validate(String value) {
        if(!value.matches("^([a-záéíóúñA-Z]+\\s*)+$")){
            return new Validator.Result(null, "El campo solo admite letras");
        }
        return null;
    }
    
}
